﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Artemis;

namespace JAWWS
{
    class CeilingNode : SceneGraphNode
    {
        public Ceiling ceiling;

        public CeilingNode(MainForm main)
        {
            this.child = null;
            this.sibling = null;
            this.ceiling = new Ceiling(main);
            this.LocalTransMatrix = this.IdMatrix;
        }
        public override void draw()
        {
            GL.glEnable(GLenum.GL_TEXTURE_2D);
            GL.glBindTexture(GLenum.GL_TEXTURE_2D, ceiling.texID);
            ceiling.draw();
            GL.glDisable(GLenum.GL_TEXTURE_2D);
        }
        public void updateCeiling()
        {
            GL.glPushMatrix();
                GL.glLoadIdentity();
                GL.glTranslatef(0.0f, 16.0f, 0.0f);
                GL.glScalef(80.0f, 4.0f, 80.0f);
                GL.glGetFloatv(GLenum.GL_MODELVIEW_MATRIX, this.LocalTransMatrix);
            GL.glPopMatrix();
        }
    }
}